package avatarFrame;

import java.awt.*;

import javax.swing.*;

import constants.*;

public class AvatarPanel extends JPanel {
	Image avartaImg;

	public AvatarPanel() {
		this.setBackground(Constants.PANEL_BACKGROUND_COLOR);
		this.setSize(Constants.AVATAR_PANEL_WIDTH, Constants.AVATAR_PANEL_HEIGHT);
	}

	@Override
	public void paint(Graphics g) {
		super.paint(g);
		g.drawImage(avartaImg, 0, 0, this);
	}

	public void draw(Image avartaImg) {
		this.avartaImg = avartaImg;
		repaint();
	}

}
